<form action="/auth/login" method="post">
<a href="#" onclick="display('open_id')">openID 登陆</a>   <a href="#" onclick="display('Ordinary')"><%="app_title".t%>登陆</a>

<div id="open_id" style="display:none">  
        <br><br>
        openID:<input type="text" name="openid_url" id="openid_url" size="30" value=""/><br/>
        <p><%= submit_tag 'Log in' %> <a href="/account/signup">Or create a new account </a></p>
</div>
<div id="Ordinary">
      <p><label for="login">Login</label><br/>
      <%= text_field_tag 'login' %></p>
      <p><label for="password">Password</label><br/>
      <%= password_field_tag 'password' %></p>
      <p><label for="remember_me">Remember me:</label>
      <%= check_box_tag 'remember_me' %> <font color="red"><%=flash[:notice]%></font></p>
<div>
  <p><%= submit_tag 'Log in' %> <a href="/account/signup">Or create a new account </a></p>
</form>
<script>
function display(str){
    if(str=="Ordinary"){
        $("open_id").style.display = "none"
        $("Ordinary").style.display = "block"
        $("openid_url").value=""
   }else{
                $("open_id").style.display = "block"
                 $("Ordinary").style.display = "none"
              }
}
</script>